
 
#define  _CRT_SECURE_NO_WARNINGS
#include "UnityDebug.h"



#undef NDEBUG
#define LOG_NIDEBUG 0
#define LOG_NDEBUG 0
#define LOG_NDDEBUG 0



void(* logCallback)(int type,const char* tag, const char* currentTime, const char* message, const char* stackTrace);
 

void L01(int type, const char* msg) {
    if (logCallback == NULL)return;
    logCallback(type,"","", msg ,"");
}


void L01f(int type, const char* format, ...){
#ifdef __ANDROID_API__
    char ret[64];
    va_list argp;
    va_start(argp, format);
    sprintf(ret, format, argp);
    va_end(argp);
    if (logCallback == NULL)return;
    logCallback(type, "", "", ret, "");
#elif __APPLE_CC__
    
#else

#endif
}
 

void  L02(int type, const char* msg,const char* stackTrace) {
	if (logCallback == NULL)return;
    logCallback(type,"","", msg ,stackTrace);
}
void L03(int type, const char* tag ,const char* currentTime , const char* msg,const char* stackTrace) {
    if (logCallback == NULL)return;
    logCallback(type,tag,currentTime, msg ,stackTrace);
}
 


 
//---设置C#委托-------------------
void InitCSharpDelegate_log(void(*Log)(int type, const char* tag ,const char* currentTime , const char* message ,const char* stackTrace)) {
    logCallback = Log;
    logCallback(0, "", "", "cpp....InitCSharpDelegate_log02.......msg", "");
    printf("cpp....InitCSharpDelegate_log02..........printf.");


    L01(0, "cpp....InitCSharpDelegate_log02..........L01.");
}
 

 
